home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7135 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  596 b 

  1. Path: arapaho.cse.ucsc.edu!ray
  2. From: ray@cse.ucsc.edu (Ray Swartz)
  3. Newsgroups: comp.lang.c++
  4. Subject: for (int i(1); ...)
  5. Date: 21 Feb 1996 21:24:54 GMT
  6. Organization: UC Santa Cruz CIS/CE
  7. Message-ID: <4gg2j6$93g@darkstar.UCSC.EDU>
  8. NNTP-Posting-Host: arapaho.cse.ucsc.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I noticed that the syntax
  12.  
  13. for (int i(1); ...)
  14.  
  15. works just like
  16.  
  17. for (int i = 1; ...)
  18.  
  19.  
  20. however, I've not seen this used anywhere.  
  21.  
  22. This seems odd to me since initializing by assignment is seen as misleading
  23. when applied to objects.  
  24.  
  25. Should 
  26.  
  27. for (int i(1);...)
  28.  
  29.  
  30. even be used?
  31.  
  32. Ray
  33.  
  34.